<!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/Dtd/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.infodms.dms.common.Constant" %>
<%
	String contextPath = request.getContextPath();
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<%@taglib uri="/jstl/cout" prefix="c" %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<jsp:include page="${contextPath}/common/jsp_head_new.jsp" />
<title>集团客户信息报备</title>
<script type="text/javascript">

	function doInit()
	{
		loadcalendar();  //初始化时间控件
   		genLocSel('txt1','','','','',''); // 加载省份城市和县
	}
</script>
</head>
<body>
<div class="navigation"><img src="<%=contextPath%>/img/nav.gif" />&nbsp;当前位置： 集团客户管理&gt;集团客户信息管理&gt;集团客户报备新增</div>
 <form method="post" name = "fm" >
    <table width=100% border="0" align="center" cellpadding="1" cellspacing="1" class="table_query">
    <th colspan="4" align="left"><img class="nav" src="<%=contextPath%>/img/subNav.gif" /> 客户信息</th>
    <tr>
	<td class="table_query_2Col_label_4Letter">客户名称：</td>
	<td><input type='text'  class="middle_txt" name="fleetName"  id="fleetName" datatype="0,is_name,30"  value=""/>
		<font color="red">建议客户名称输入不超过15个字符</font>
		<!-- <input name="fleetSel" type="button" class="mini_btn" onclick="showFleet();" value="..." /> -->
	</td>
	<td class="table_query_2Col_label_4Letter">客户类型：</td>
	<td>
		<script type="text/javascript">
           genSelBoxExp("fleetType",<%=Constant.FLEET_TYPE%>,"","ture","short_sel","","true",'');
        </script><font color="red">*</font>
	</td>
	</tr>
	<tr>
	<td class="table_query_2Col_label_4Letter">主营业务：</td>
	<td><script type="text/javascript">
           genSelBoxExp("mainBusiness",<%=Constant.TRADE_TYPE%>,"",true,"short_sel","","true",'');
        </script></td>
	<td class="table_query_2Col_label_4Letter">资金规模：</td>
	<td><script type="text/javascript">
           genSelBoxExp("fundSize",<%=Constant.FUND_SIZE_TYPE%>,"",true,"short_sel","","true",'');
        </script>
    </td>
	</tr>
	<tr>
	<td class="table_query_2Col_label_4Letter">人员规模：</td>
    <td><script type="text/javascript">
           genSelBoxExp("staffSize",<%=Constant.COMPANY_SCOPE%>,"",true,"short_sel","","true",'');
        </script>
    </td>
   	<td class="table_query_2Col_label_4Letter">邮编：</td>
    <td><input type='text'  class="middle_txt" name="zipCode"  id="zipCode"  datatype="0,is_digit,6" value=""/></td>
	</tr>
	<tr>
	<td class="table_query_2Col_label_4Letter">区域：</td>
	<td><select class="short_sel" id="txt1" name="region"></select><font color="red">*</font></td>
	<td class="table_query_2Col_label_4Letter">&nbsp;</td>
    <td>&nbsp;</td>
	</tr>
	<tr>
	<tr>
	<td class="table_query_2Col_label_4Letter">详细地址：</td>
	<td><textarea name="address" id="address" cols="50" rows="2"></textarea></td>
	</tr>
	<th colspan="4" align="left"><img class="nav" src="<%=contextPath%>/img/subNav.gif" /> 联系人信息</th>
	<tr>
	<td class="table_query_2Col_label_5Letter">主要联系人：</td>
	<td><input type='text'  class="middle_txt" name="mainLinkman"  id="mainLinkman" datatype="0,is_name,15" value=""/></td> 
	<td class="table_query_2Col_label_4Letter">职务：</td>
	<td><input type='text'  class="middle_txt" name="mainJob"  id="mainJob" value=""/></td>
    </tr>
	<tr>
	<td class="table_query_2Col_label_5Letter">电话：</td>
	<td><input type='text'  class="middle_txt" name="mainPhone"  id="mainPhone"  datatype="0,is_null,100" value=""/></td>
	<td class="table_query_2Col_label_4Letter">电子邮件：</td>
	<td><input type='text'  class="middle_txt" name="mainEmail"  id="mainEmail" datatype="1,is_email,35" value=""/></td>
	</tr> 
	<tr>
	<td class="table_query_2Col_label_5Letter">其他联系人：</td>
	<td><input type='text'  class="middle_txt" name="otherLinkman"  id="mainLinkman"  datatype="1,is_name,15" value=""/></td>
    <td class="table_query_2Col_label_4Letter">职务：</td>
	<td><input type='text'  class="middle_txt" name="otherJob"  id="otherJob" value=""/></td>
	</tr>	    
	<tr>
	<td class="table_query_2Col_label_5Letter">电话：</td>
	<td><input type='text'  class="middle_txt" name="otherPhone"  id="otherPhone" datatype="1,is_null,100"  value=""/></td>
	<td class="table_query_2Col_label_4Letter">电子邮件：</td>
	<td><input type='text'  class="middle_txt" name="otherEmail"  id="otherEmail" datatype="1,is_email,35"  value=""/></td>
	</tr>	    
	<th colspan="4" align="left"><img class="nav" src="<%=contextPath%>/img/subNav.gif" /> 需求说明</th>
	<tr>
		<td class="table_query_2Col_label_4Letter">拜访日期：</td>
		<td>
			<input name="visitDate" id="t1" value="" type="text" class="short_txt" datatype="0,is_date,10" hasbtn="true" callFunction="showcalendar(event, 't1', false)">
		</td>
		<td class="table_query_2Col_label_4Letter">&nbsp;</td>
	    <td>&nbsp;</td>
	</tr>
	<tr>
		<td class="table_query_2Col_label_5Letter">车系选择：</td>
		<td>
			<select name="seriesId">
				<option value="-1">-全系-</option>
					<c:forEach items="${list}" var="slist">
				<option value="<c:out value="${slist.GROUP_ID}"/>"><c:out value="${slist.GROUP_NAME}"/></option>	
					</c:forEach>
			</select>
		</td>
		<td class="table_query_2Col_label_4Letter">数量：</td>
		<td>
			<input type='text'  class="short_txt" name="seriesCount"  id="seriesCount" value="" datatype="0,is_digit,8"/>
		</td>
    </tr>
	<tr>
		<td class="table_query_2Col_label_5Letter">备注：</td>
		<td colspan="3" align="left"><textarea name="reqRemark" cols="70" rows="2"></textarea></td>
    </tr>
    </table> 
    <table class=table_query>
	 <tr>
	 <td>
	<input type="button" value="保存" name="saveBtn" class="normal_btn" onclick="saveFleetInfo()"/>
	<input type="button" value="提交" name="submitBtn" class="normal_btn" onclick="submission()">	
	<input type="button" value="取消" name="cancelBtn"  class="normal_btn" onclick="history.back();" /></td>
	</tr>
   </table>
  <!-- 查询条件 end -->
</form>

<!--页面列表 begin -->
<script type="text/javascript" >
		      
//设置超链接  begin      
	
	//保存的ACTION设置
	function saveFleetInfo(){
	 if(submitForm('fm')){
		var fleetType = document.fm.fleetType.options[document.fm.fleetType.selectedIndex].value;
		var region = document.getElementById('txt1').value ;
		if(region == null || region == "") {
			MyAlert("请选择区域！");	
			return;
		}
		if(fleetType==null||fleetType=="")
		{
			MyAlert("请选择客户类型！");	
			return;
		}else{
			fm.action = '<%=contextPath%>/sales/fleetmanage/fleetInfoManage/FleetInfoApplication/saveFleetInfo.do';
		 	fm.submit();
		}
	 }
	}
	
	//显示已有集团客户信息
	function showFleet(){
		OpenHtmlWindow('<%=contextPath%>/sales/fleetmanage/fleetInfoManage/FleetInfoApplication/showFleetList.do',900,600);
	}
	
	//取得子窗口选择的集团客户信息
	function fetchFleetInfo(fleetName,fleetType,region,mainBusiness,fundSize,staffSize,purpose,zipCode,address,mainLinkman,mainPhone,mainJob,mainEmail,otherLinkman,otherPhone,otherJob,otherEmail,status,submitUser,submitDate){

		document.getElementById("fleetName").value = fleetName;
		document.fm.fleetType.value = fleetType;
		document.fm.mainBusiness.value = mainBusiness;
		document.fm.fundSize.value= fundSize;
		document.fm.staffSize.value= staffSize;
		document.fm.purpose.value = purpose;
		document.fm.region.value = region;
		document.getElementById("zipCode").value = zipCode;
		document.getElementById("address").value = address;
		document.getElementById("mainLinkman").value = mainLinkman;
		document.getElementById("mainJob").value = mainJob;
		document.getElementById("mainPhone").value = mainPhone;
		document.getElementById("mainEmail").value = mainEmail;
		document.getElementById("otherLinkman").value = otherLinkman;
		document.getElementById("otherPhone").value = otherPhone;
		document.getElementById("otherJob").value = otherJob;
		document.getElementById("otherEmail").value = otherEmail;
	}
	
	// 提交的ACTION设置
	function submission(){
		if(submitForm('fm')){
			var fleetType = document.fm.fleetType.options[document.fm.fleetType.selectedIndex].value;
			if(fleetType==null||fleetType=="")
			{
				MyAlert("请选择客户类型！");	
				return;
			}else{
				MyConfirm("是否确认提交?",submitCnfrm);
			}
		 }
	}
	
	// 确认提交的ACTION
	function submitCnfrm(){
		fm.action = '<%=contextPath%>/sales/fleetmanage/fleetInfoManage/FleetInfoApplication/addSubmitInfo.do';
		fm.submit();
	
	}
//设置超链接 end
	
</script>
<!--页面列表 end -->
</body>
</html>
